package com.wxg.other.collections;

/**
 * 示例来自“ON JAVA 中文版”基础卷 ch12.11 新特性：记录（record）类型
 */
record PlusTen(int x) {
    PlusTen {
        x += 10;
    }

    // Cannot assign a value to final variable 'x'
    // void mutate() { x += 10; }

    public static void main(String[] args) {
        System.out.println(new PlusTen(10));
    }
}
